import request from "@/utils/request.js";


/**
 * 获取盲盒列表
 */
export function getblindBoxList() {
	return request.get('blindBox/list', {}, {
		noAuth: true
	});
}

/**
 * 获取详情
 */
export function getinfoDetail(id) {
	return request.get(`blindBox/info?id=${id}`, {}, {
		noAuth: true
	});
}

/**
 * 使用通证兑换钥匙，乐豆/碎片兑换盲卡
 */
export function exchangeAdd(data) {
	return request.post('blindBox/exchange', data, {});
}

/**
 * 一键开盲盒
 */
export function open(data) {
	return request.post('blindBox/open', data, {});
}

/**
 * 删除
 */
export function deleteblindBox(data) {
	return request.post(`/blindBox/delete`, data);
}

/**
 * 获取质押列表
 */
export function getPledgeList() {
	return request.get('tokenPledge/list', {}, {
		noAuth: true
	});
}

/**
 * 参与质押
 */
export function joinPledge(data) {
	return request.post('tokenPledge/join', data, {
		noAuth: true
	});
}

/**
 * 参与质押记录
 */
export function getjoinList() {
	return request.get('tokenPledge/joins', {}, {
		noAuth: true
	});
}

/**
 * 通证交易列表
 */
export function gettradeList(data) {
	return request.get('trade/list', data, {
		noAuth: true
	});
}

/**
 * 我的通证
 */
export function gettokenList() {
	return request.get('user/center/my/token', {}, {
		noAuth: true
	});
}

/**
 * 通证交易首页
 */
export function getindexList() {
	return request.get('trade/index', {}, {
		noAuth: true
	});
}
/**
 * 发起交易订单
 */
export function submitorder(data) {
	return request.post('trade/order', data, {
		noAuth: true
	});
}
/**
 *  我的订单详情
 */
export function getmyList() {
	return request.get('trade/list/my', {}, {
		noAuth: true
	});
}
/**
 *  我的订单详情
 */
export function subreceive(data) {
	return request.post('trade/order/receive', data, {
		noAuth: true
	});
}

/**
 *  取消交易订单
 */
export function subcancel(data) {
	return request.post('trade/order/cancel', data, {
		noAuth: true
	});
}
/**
 *  支付交易订单
 */
export function submitpay(data) {
	return request.post('trade/order/pay', data, {
		noAuth: true
	});
}
/**
 *  确认交易订单
 */
export function subconfirm(data) {
	return request.post('trade/order/confirm', data, {
		noAuth: true
	});
}

/**
 *  我的乐豆
 */
export function getbeansList() {
	return request.get('user/center/my/beans', {}, {
		noAuth: true
	});
}

/**
 *  乐豆兑换通证
 */
export function exchangeToken(data) {
	return request.post('user/center/beans/exchange/token', data, {
		noAuth: true
	});
}

/**
 *  乐豆兑换积分
 */
export function exchangeIntegral(data) {
	return request.post('user/center/beans/exchange/integral', data, {
		noAuth: true
	});
}

/**
 *  乐豆记录
 */
export function getbeansrecord(data) {
	return request.get('user/center/beans/list', data, {
		noAuth: true
	});
}

/**
 *  乐豆赠送下属
 */
export function transferbeans(data) {
	return request.post('user/center/beans/transfer', data, {
		noAuth: true
	});
}

/**
 *  乐豆申请提现
 */
export function withdrawbeans(data) {
	return request.post('user/center/beans/withdraw', data, {
		noAuth: true
	});
}

/**
 *  我的广告积分
 */
export function getMyScore() {
	return request.get('user/center/my/score', {}, {
		noAuth: true
	});
}

/**
 *  广告积分兑换通证
 */
export function scoreExchangeBeans(data) {
	return request.post('user/center/score/exchange/token', data, {
		noAuth: true
	});
}

/**
 *  乐豆记录
 */
export function getScoreList(data) {
	return request.get('user/center/score/list', data, {
		noAuth: true
	});
}

/**
 *  获取个人中心详情
 */
export function getinfo() {
	return request.get('user/center/info', {
		noAuth: true
	});
}

/**
 *  获取购物积分详情
 */
export function getMyIntegral() {
	return request.get('user/center/my/integral', {
		noAuth: true
	});
}

/**
 *  购物积分兑换乐豆
 */
export function exchangeBeans(data) {
	return request.post('user/center/integral/exchange/beans', data, {
		noAuth: true
	});
}

/**
 *  通证记录
 */
export function getTokenList(data) {
	return request.get('user/center/token/list', data, {
		noAuth: true
	});
}

/**
 *  我的通证
 */
export function getMyToken() {
	return request.get('user/center/my/token', {}, {
		noAuth: true
	});
}

/**
 *  碎片记录
 */
export function getFragmentList(data) {
	return request.get('user/center/fragment/list', data, {
		noAuth: true
	});
}

/**
 *  我的碎片
 */
export function getMyFragment() {
	return request.get('user/center/my/fragment', {}, {
		noAuth: true
	});
}

/**
 *  钥匙记录
 */
export function getLocksList(data) {
	return request.get('user/center/locks/list', data, {
		noAuth: true
	});
}

/**
 *  我的钥匙
 */
export function getMyLocks() {
	return request.get('user/center/my/locks', {}, {
		noAuth: true
	});
}

/**
 *  填写收款信息
 */
export function submitbank(data) {
	return request.post('trade/bank', data, {
		noAuth: true
	});
}

/**
 *  收款信息详情
 */
export function getbankList() {
	return request.get('trade/bank', {}, {
		noAuth: true
	});
}

/**
 *  看广告得积分
 */
export function advertList() {
	return request.get('advert', {
		noAuth: true
	});
}

/**
 *  通证记录
 */
export function getcenterlist(data) {
	return request.get('user/center/token/list', data, {
		noAuth: true
	});
}

/**
 * 通证交易详情
 */
export function getTradeInfo(id) {
	return request.get(`trade/${id}`, {}, {
		noAuth: true
	});
}

/**
 * 通证交易申诉
 */
export function tradeAppeal(data) {
	return request.post(`trade/order/appeal`, data, {
		noAuth: true
	});
}
